package com.jt.utils;

import com.jt.pojo.User;

public class UserThreadLocal {
    private static ThreadLocal<User> userThreadLocal = new ThreadLocal<>();

    // 存
    public static void set(User user) {
        userThreadLocal.set(user);
    }

    // 取
    public static User get() {
        return userThreadLocal.get();
    }
    // 删除
    public static void remove() {
        userThreadLocal.remove();
    }
}
